function weight = calculate_added_metabolites_weight( ... 
    metabolitesCountInPathway, poolMetabolitesCount, addedMetabolitesCount,allMetaboliteCount)
    weight = (1 - poolMetabolitesCount / addedMetabolitesCount) + ...
        (addedMetabolitesCount - poolMetabolitesCount) / allMetaboliteCount + ...
        metabolitesCountInPathway / allMetaboliteCount + ...
        (addedMetabolitesCount - poolMetabolitesCount) / metabolitesCountInPathway;
end